<?php
/**
 * <https://y.st./>
 * Copyright © 2019 Alex Yst <mailto:copyright@y.st>
 * 
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program. If not, see <https://www.gnu.org./licenses/>.
**/

$xhtml = array(
	'<{title}>' => 'Ungraded',
	'<{subtitle}>' => 'Written in <span title="Computer Graphics">CS 4406</span> by <a href="https://y.st./">Alexand(er|ra) Yst</a>, finalised and <a href="https://y.st./en/coursework/CS4406/Ungraded.xhtml">archived</a> on 2019-06-26',
	'<{copyright year}>' => '2019',
	'takedown' => '2017-11-01',
	'<{body}>' => <<<END
<p>
	For this assignment, the instructions say we need to submit something, but they don&apos;t say what to submit.
	The notes walk us through some example code, but don&apos;t have us actually make any changes or do anything, so there&apos;s not really any altered code to turn in.
	With this assignment being ungraded, it makes sense that this would basically be an example and a reading assignment, but it&apos;s odd that the instructions say to submit something.
	With all that in mind, I decided to submit my thoughts as I read through the example.
</p>
<p>
	The instructions say that we&apos;re using <code>three.js</code> for this course because it doesn&apos;t require use of C++, and instead uses JavaScript.
	It says that JavaScript is a language that was introduced to us elsewhere in the computer science program.
	I remember being told JavaScript exists in the Web development courses, but we didn&apos;t actually learn JavaScript or write any.
	Instead, we worked with $a[PHP].
	We didn&apos;t actually do any client-side scripting.
	Have any of you learned JavaScript in this school&apos;s computer science program?
	If so, I&apos;d be very interested to know which course that&apos;s taught in.
	I&apos;ve learned a tiny bit of JavaScript on my own time, but really don&apos;t know how to use the language much at all.
</p>
<p>
	The instructions also say to click on the &quot;Development Environment link in the course page&quot;, but no such link seems to exist.
</p>
<p>
	The instructions gave us two options for viewing the code.
	We were given a file with the raw code and a link to the same code hosted on JS Bin.
	For some reason, I couldn&apos;t get the raw code to render.
	In my browser, it just showed up as a blank page accompanied by a Firebug console.
	However, the code on JS Bin worked just fine.
</p>
<p>
	The code was supposed to render a spinning sphere, but the colours of the sphere stayed in place while the shape of the sphere spun, making it so you couldn&apos;t actually see the spinning.
	The edges seemed to move a bit.
	At first, this confused me.
	Actually, it confused me for several days.
	I finally understood what was happening though: this isn&apos;t a perfect sphere!
	Remember that in our reading material for the week, it was explained that the surface of everything in <code>three.js</code> is made of triangles.
	That means there are corners, edges, and faces all over this &quot;sphere&quot;.
	We can&apos;t see them because of the way they&apos;re rendered, but as the object spins, we see wider and narrower parts pass over the edge, making the shape of the edge appear to shift slightly, back and forth.
	In the screenshot in the notes, you can see the faces of the &quot;sphere&quot;.
	However, in the version rendering in Firefox, those faces aren&apos;t visible.
</p>
<p>
	The notes also didn&apos;t match the code, completely.
	For example, the code set the camera&apos;s <var>z</var> coordinate to <code>200</code>, while the notes said that the code only set it to <code>30</code>.
</p>
<p>
	The section on convex polygons ended a bit strange.
	It said that if a polygon isn&apos;t convex, it&apos;s called a &quot;non-convex polygon&quot;.
	There&apos;s a word for polygons that aren&apos;t convex though: they&apos;re concave!
	So why aren&apos;t these polygons called &quot;concave polygons&quot; in this context, when they are called that in other contexts?
</p>
<p>
	The section of the notes explaining materials was enlightening.
	It tells us that a mesh only defines points ans the edges that connects them.
	We can&apos;t see the faces though unless we cover the faces with a material.
	That means that if we were to picture what it looked like, the mesh is basically just a wireframe.
	You can add a material that covers one of the holes between wires, but if you don&apos;t, it remains just a hole.
	There&apos;s nothing there to see.
</p>
END
);
